package com.tinelion.producer.controller;


import com.tinelion.producer.component.Sender;
import com.tinelion.common.entity.LogMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
public class SenderController {

    @Autowired
    private Sender sender;

    @GetMapping("/message")
    public String send() throws Exception{
        this.sender.send(new LogMessage(1L,"test log", "info", "订单服务", new Date(), 1L));
       return "SUCCESS";
    }
}
